package com.fate.securecheckplatform.db;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;

import com.fate.securecheckplatform.bean.TerminalInfoEntity;

import java.util.List;

@Dao
public interface TerminalDao {

    @Query("DELETE FROM  TerminalInfoEntity")
    void deleteAllTerminal();

    @Query("SELECT  * FROM  TerminalInfoEntity WHERE ip=:ip")
    List<TerminalInfoEntity> getTerminals(String ip);

    @Insert
    void insertTerminals(List<TerminalInfoEntity> infos);
}
